/*
 *  Project     : QKeyboardStatistic
 *  Author      : Durachenko Aleksey V. <durachenko.aleksey@gmail.com>, 2011
 *  Licence     : GNU GENERAL PUBLIC LICENSE Version 2
 */
#ifndef GLOBAL_H
#define GLOBAL_H

#include <QObject>
#include <QSettings>
#include <QEvent>
#include "version.h"

// constnts to determinate user events
const int G_KeyPressEventId = QEvent::User;
const int G_MouseMoveEventId = QEvent::User + 1;
const int G_MousePressEventId = QEvent::User + 2;

// quick settnigs initialization. before you can use symbol 'settings'
#define G_SETTINGS_INIT() \
    QSettings settings(QSettings::IniFormat, QSettings::UserScope, gProjectFamily, gProjectName);

// the full name of the current programm
#define G_FULL_PROGRAM_NAME()                       \
    (QString("%1 - %2.%3%4 build %5 (%6.%7.%8)")    \
        .arg(QObject::tr(gProgramName))             \
        .arg(gVersionMajor)                         \
        .arg(gVersionMinor)                         \
        .arg(gVersionStatusShort)                   \
        .arg(gVersionBuild)                         \
        .arg(gVersionYear)                          \
        .arg(gVersionMonth)                         \
        .arg(gVerstionDay))

#endif
